package com.yz.xyt.domain.vo;

import com.yz.xyt.constant.Constants;
import com.yz.xyt.domain.Leave;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 请假Vo
 * @author JW.WANG
 */
public class LeaveVo extends Leave {

    private String studentName;
    private String clazzName;
    //部门名称
    private String dname;
    private String majorName;
    /**
     * 是否要审批
     */
    private Boolean isApproval;
    private Integer pageSize;
    private Integer pageNumber;
    //请假异常
    private Boolean leaveError;
    //撤销的请假
    private Boolean leaveCancel;

    @DateTimeFormat(pattern = "yyyy-MM-dd",fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
    private Date startDate;

    @DateTimeFormat(pattern = "yyyy-MM-dd",fallbackPatterns = "yyyy-MM-dd hh:mm:ss")
    private Date endDate;
    /**
     * 教职工编号
     */
    private String staffNumber;
    private String grade;

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getClazzName() {
        return clazzName;
    }

    public void setClazzName(String clazzName) {
        this.clazzName = clazzName;
    }

    public String getDname() {
        return dname;
    }

    public void setDname(String dname) {
        this.dname = dname;
    }

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    public Boolean getApproval() {
        return isApproval;
    }

    public void setApproval(Boolean approval) {
        isApproval = approval;
    }

    public Integer getPageSize() {
        return pageSize = "".equals(pageSize) || pageSize == null ? Constants.DEFAULT_PAGE_SIZE : pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getPageNumber() {
        return pageNumber = "".equals(pageNumber) || pageNumber ==null ? Constants.DEFAULT_PAGE_NUMBER : pageNumber;
    }

    public void setPageNumber(Integer pageNumber) {
        this.pageNumber = pageNumber;
    }

    public String getStaffNumber() {
        return staffNumber;
    }

    public void setStaffNumber(String staffNumber) {
        this.staffNumber = staffNumber;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public Boolean getLeaveError() {
        return leaveError;
    }

    public void setLeaveError(Boolean leaveError) {
        this.leaveError = leaveError;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Boolean getLeaveCancel() {
        return leaveCancel;
    }

    public void setLeaveCancel(Boolean leaveCancel) {
        this.leaveCancel = leaveCancel;
    }

    @Override
    public String toString() {
        return "LeaveVo{" +
                "studentName='" + studentName + '\'' +
                ", clazzName='" + clazzName + '\'' +
                ", dname='" + dname + '\'' +
                ", majorName='" + majorName + '\'' +
                ", isApproval=" + isApproval +
                ", pageSize=" + pageSize +
                ", pageNumber=" + pageNumber +
                ", leaveError=" + leaveError +
                ", leaveCancel=" + leaveCancel +
                ", startDate=" + startDate +
                ", endDate=" + endDate +
                ", staffNumber='" + staffNumber + '\'' +
                ", grade='" + grade + '\'' +
                '}';
    }
}
